#include <my_head.h>
int main(int argc, char const *argv[])
{
    if(2 != argc){
        printf("Usage:%s pathname\n",argv[0]);
        return -1;
    }
    FILE *fp = NULL;
    if(NULL == (fp = fopen(argv[1],"r")))
    ERR_LOG("fopen error");
    int line = 0;
    char buff[20] = {0};
    while(NULL != fgets(buff,sizeof(buff),fp)){
         if('\n'== buff[strlen(buff)-1]){
        line++;
      }
    }
    printf("%d\n",line);
    fclose(fp);
    return 0;
}
